app.controller('NewFaultCtrl',function($scope,$localStorage,$http,$location,$window,$state){
	$scope.namedata = $localStorage.cur_user.uname;
	$scope.nowtime = getnowtime();
})

function getnowtime(){
    var getdata = new Date();       
    var year = getdata.getFullYear();
    var day = getdata.getDate();
    var month = getdata.getMonth()+1;
    var hours = getdata.getHours();
    var minutes = getdata.getMinutes();
    var secondes = getdata.getSeconds();
   return getdata = year + "-" + month + "-" + day + " "  + hours + ":" + minutes + ":" + secondes ; 
}